package com.SouthernWall_404.AgeRight.Common.world.items;

import com.SouthernWall_404.AgeRight.Common.AgeRight;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;

public class ModNBTItem extends Item {
    public ModNBTItem(Properties p_41383_) {
        super(p_41383_);
    }

    public static CompoundTag getOrCreateModPack(ItemStack itemStack)
    {
        CompoundTag nbt=itemStack.getOrCreateTag();
        CompoundTag modPack=new CompoundTag();
        if(nbt.contains(AgeRight.MODID))
        {
            modPack=nbt.getCompound(AgeRight.MODID);
        }

        return modPack;
    }
    public static void putModPack(ItemStack itemStack,CompoundTag modPack)
    {

        CompoundTag nbt=itemStack.getOrCreateTag();

        nbt.put(AgeRight.MODID,modPack);


    }

}
